# How Does Improvement in Commuting Affect Employees? Evidence from a Natural Experiment
# Version: 20211014

## Yao Lu (luyao@sem.tsinghua.edu.cn),        Tsinghua University
## Xinzheng Shi (shixzh@sem.tsinghua.edu.cn), Tsinghua University
## Jagadeesh Sivadasan (jagadees@umich.edu),  University of Michigan
## Zhufeng Xu (zhufeng@zhufengxu.com),        Central University of Finance and Economics

## Main Script Flag 
AllScriptFlag <- 1

## Header 
source("./Scripts/1Header.R")

## Figure 1: Subway Line 15 and Connected Lines
source("./Scripts/Figure1.R")

## Figure 2: Trends in Differentials for Log (BonusT)
source("./Scripts/Figure2.R")

## Figure 3: Time of Arrival and Leaving
source("./Scripts/Figure3.R")

## Figure 4: Survival Rate for Initial Sample of Workers
source("./Scripts/Figure4.R")

## Table 1: Summary Statistics
source("./Scripts/Table1.R")

## Table 2: Impact of the Opening of Subway Line 15 on Employee Compensation
source("./Scripts/Table2.R")

## Table 3: Effect of the Subway on Employees' Attendance and Time at Work 
source("./Scripts/Table3.R")

## Table 4: Effects of the Opening of Subway Line 15 on Employee Exit
## Stata is called. Please specity your Stata path and Stata version in Table4.R
source("./Scripts/Table4.R")


